Stub CLAUDE.md; move internals to docs/internals.md#33
Merged
Conversation
CLAUDE.md is auto-injected into agent context on first file read in this repo — at ~120 lines it was the largest involuntary context load in Heart. It is now a 9-line stub pointing at AGENTS.md (matching the PyAutoBrain pattern); the internals (check framework, tick budget, adding checks, hard rules) move to docs/internals.md, read on demand. The never-rewrite-history safety block moves to AGENTS.md so it stays in the always-read path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR reduces default agent-context token cost by stubbing CLAUDE.md and moving detailed PyAutoHeart internals into an on-demand document (docs/internals.md), while updating in-repo references accordingly.
Changes:
- Replace the heavy
CLAUDE.mdwith a short pointer toAGENTS.mdanddocs/internals.md. - Add
docs/internals.mdcontaining the check framework rules, tick budget guidance, and contribution internals. - Update internal references in Heart/Health Agent docs and docstrings, and move the “never rewrite history” block into
AGENTS.md.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| heart/validate.py | Updates boundary documentation reference from CLAUDE.md to AGENTS.md. |
| health_agent/capabilities.yaml | Updates “adding a check” pointer to docs/internals.md. |
| health_agent/capabilities.md | Updates documentation list to reference docs/internals.md for internals. |
| docs/internals.md | New internals doc: hard rules, structure, adding checks, local running notes. |
| CLAUDE.md | Stubbed to point to AGENTS.md + docs/internals.md instead of embedding internals. |
| AGENTS.md | Updates internals pointer and adds the “never rewrite history” section. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| Operational detail for working **inside** this repo: the check framework, the | ||
| tick budget, how to add a check, and the hard rules. What PyAutoHeart *is* and | ||
| the Brain/Heart/Build boundary live in [`AGENTS.md`](../AGENTS.md) — read that |
| discovering this repository. | ||
| Read [`AGENTS.md`](AGENTS.md) in this directory. It is the shared source of | ||
| truth for PyAutoHeart — the health authority of the PyAuto organism — and for | ||
| the Brain / Heart / Build boundary. |
Comment on lines
+21
to
+27
| 4. **Lightweight test footprint**. Heart's own test suite runs on the | ||
| standard library plus PyYAML only — no scientific/ML stack (numba, | ||
| matplotlib, JAX, the PyAuto libraries). This keeps the suite fast and | ||
| flake-free so it runs anywhere (CI, mobile, sandbox). It is a property of | ||
| *Heart's* tests, not a claim about the projects Heart watches — Heart may | ||
| perfectly well monitor non-JAX (or JAX-heavy) repos; that's their concern, | ||
| not the suite's. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claude Code auto-injects a repo's
CLAUDE.mdinto context the first time any file under it is read. Heart's was ~120 lines of internals, paid by every session that merely glances at this repo. Now:CLAUDE.mdis a stub →AGENTS.md(the PyAutoBrain pattern); internals live indocs/internals.md(on-demand); the never-rewrite-history block moves toAGENTS.md. References inheart/validate.py,health_agent/capabilities.{yaml,md}updated. 202 tests pass.Part of the organism token-efficiency roadmap (item 2).
🤖 Generated with Claude Code